import React from 'react'
import ReactDOM from 'react-dom'

let list = [
  { id: 1, name: '北京', salary: 15000 },
  { id: 2, name: '上海', salary: 16000 },
  { id: 3, name: '杭州', salary: 14000 },
]

const element = (
  <>
    <ul>
      {list.map((item) => (
        <li key={item.id}> <h1>城市:{item.name}</h1> <p>薪资:{item.salary}</p> </li>
      ))}
    </ul>
  </>
)

ReactDOM.render(element, document.getElementById('root'))
